﻿<Window x:Class="Tailspin.Admin.App.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Tailspin Toys Storefront Catalog Admin" Height="440" Width="515">
    <Grid>
        <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding}" Margin="8,83,6,0" Name="ProductsGrid" Height="130" SelectionMode="Single" SelectionUnit="FullRow" VerticalAlignment="Top" SelectionChanged="ProductsGrid_SelectionChanged" AlternatingRowBackground="#FFFFF3CE">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=SKU}" CanUserReorder="False" CanUserResize="True" Header="SKU" IsReadOnly="True"  Width="80"/>
                <DataGridTextColumn Binding="{Binding Path=ProductName}" CanUserReorder="False" CanUserResize="True" Header="Name" IsReadOnly="False" Width="150" />
                <DataGridTextColumn Binding="{Binding Path=BasePrice}" CanUserReorder="False" CanUserResize="True" Header="Price" IsReadOnly="False" Width="40" />
                <DataGridTextColumn Binding="{Binding Path=DateAvailable}" CanUserReorder="False" CanUserResize="True" Header="Date Available" IsReadOnly="False" Width="140" />
                <DataGridCheckBoxColumn Binding="{Binding Path=AllowPreorder}" CanUserReorder="False" CanUserResize="True" Header="Preorder" IsReadOnly="False" Width="60" />
            </DataGrid.Columns>
        </DataGrid>
        <TabControl Margin="8,219,6,12" Name="ProductDetailsTab">
            <TabItem Header="Description" Name="DescriptionTab">
                <Grid>
                    <Label Content="Title:" Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="label1" VerticalAlignment="Top" Width="120" />
                    <TextBox Height="23" Margin="141,6,6,0" Name="TitleTextBox" VerticalAlignment="Top" IsManipulationEnabled="True" />
                    <TextBox Margin="6,40,6,6" Name="BodyTextBox" TextWrapping="WrapWithOverflow" IsManipulationEnabled="True" />
                </Grid>
            </TabItem>
            <TabItem Header="Related Products" Name="RelatedTab">
                <Grid>
                    <Label Content="Related Products" Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="label2" VerticalAlignment="Top" Width="120" />
                    <DataGrid AutoGenerateColumns="False" HorizontalAlignment="Left" Margin="6,40,0,6" Name="RelatedGrid" Width="457" HeadersVisibility="None" AllowDrop="True" SelectionMode="Single">
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=Product.SKU}" CanUserReorder="False" CanUserResize="True" IsReadOnly="True" />
                            <DataGridTextColumn Binding="{Binding Path=Product.ProductName}" CanUserReorder="False" CanUserResize="True" IsReadOnly="True" />
                            <DataGridCheckBoxColumn Binding="{Binding Path=IsRelated}" CanUserReorder="False" CanUserResize="True" IsReadOnly="False" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
        </TabControl>
        <Image Height="65" HorizontalAlignment="Left" Margin="8,12,0,0" Name="image1" Stretch="None" VerticalAlignment="Top" Width="266" DataContext="{Binding}" Source="/Tailspin.Admin.App;component/Resources/logo.png" UseLayoutRounding="False" MaxHeight="65" MaxWidth="266" />
        <Button Content="Save" Height="65" Margin="0,12,6,0" Name="SaveButton" VerticalAlignment="Top" HorizontalAlignment="Right" Width="207" Click="SaveButton_Click" />
    </Grid>
</Window>
